Class CF.NUR.MNISV3.TemplateItem Extends %Persistent
{

Property TemplateId As %String(TRUNCATE = 1);

Property ItemCode As %String(TRUNCATE = 1);

Property ItemName As %String(TRUNCATE = 1);

Property Color As %String(TRUNCATE = 1);

Property DataSource As %String(TRUNCATE = 1);

Property Display As %String(TRUNCATE = 1);

Property FontSize As %String(TRUNCATE = 1);

Property FontStyle As %String(TRUNCATE = 1);

Property FontWeight As %String(TRUNCATE = 1);

Property ItemDefault As %String(TRUNCATE = 1);

Property ItemHeight As %String(TRUNCATE = 1);

Property ItemOption As %String(TRUNCATE = 1);

Property ItemType As %String(TRUNCATE = 1);

Property ItemWidth As %String(TRUNCATE = 1);

Property KeyboardType As %String(TRUNCATE = 1);

Property LabelColor As %String(TRUNCATE = 1);

Property LabelFlag As %String(TRUNCATE = 1);

Property LabelFontSize As %String(TRUNCATE = 1);

Property LabelFontStyle As %String(TRUNCATE = 1);

Property LabelFontWeight As %String(TRUNCATE = 1);

Property LineHeight As %String(TRUNCATE = 1);

Property PositionX As %String(TRUNCATE = 1);

Property PositionY As %String(TRUNCATE = 1);

Property RequiredFlag As %String(TRUNCATE = 1);

Index Code On (TemplateId, ItemCode);

Index TemCode On (TemplateId, ItemCode);

/// d ##class(CF.NUR.MNISV3.TemplateItem).Save("滴速","Speed",2,"INF","E","","1")
/// d ##class(CF.NUR.MNISV3.Node).Save("单位","Unit",2,"INF","R","","")
/// d ##class(CF.NUR.MNISV3.Node).Save("备注","Note",2,"INF","E","","")
ClassMethod Save(TemplateId As %String, HospitalId As %String) As %String
{
	s rw=""  //$o(^CF.NUR.MNISV3.TemplateItemI("Code"," "_HospitalId," "_$ZCVT(TemplateId,"U"),""))
	i rw'="" s obj=##class(CF.NUR.MNISV3.TemplateItem).%OpenId(rw)
	e  s obj=##class(CF.NUR.MNISV3.TemplateItem).%New()
	
	s obj.TemplateId=TemplateId
	d obj.%Save()
	q obj.%Id()
}

ClassMethod DeleteData(rw As %String) As %String
{
	q:rw="" 0
	s a=##class(CF.NUR.MNISV3.TemplateItem).%DeleteId(rw)
	q 1
}

Storage Default
{
<Data name="TemplateItemDefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>TemplateCode</Value>
</Value>
<Value name="3">
<Value>HospitalId</Value>
</Value>
<Value name="4">
<Value>BackgroundColor</Value>
</Value>
<Value name="5">
<Value>Color</Value>
</Value>
<Value name="6">
<Value>FontSize</Value>
</Value>
<Value name="7">
<Value>FontStyle</Value>
</Value>
<Value name="8">
<Value>FontWeight</Value>
</Value>
<Value name="9">
<Value>FormCode</Value>
</Value>
<Value name="10">
<Value>FormName</Value>
</Value>
<Value name="11">
<Value>FormStyle</Value>
</Value>
<Value name="12">
<Value>FormType</Value>
</Value>
<Value name="13">
<Value>Margin</Value>
</Value>
<Value name="14">
<Value>TemplateId</Value>
</Value>
<Value name="15">
<Value>ItemCode</Value>
</Value>
<Value name="16">
<Value>ItemName</Value>
</Value>
<Value name="17">
<Value>DataSource</Value>
</Value>
<Value name="18">
<Value>Display</Value>
</Value>
<Value name="19">
<Value>ItemDefault</Value>
</Value>
<Value name="20">
<Value>ItemHeight</Value>
</Value>
<Value name="21">
<Value>ItemOption</Value>
</Value>
<Value name="22">
<Value>ItemType</Value>
</Value>
<Value name="23">
<Value>ItemWidth</Value>
</Value>
<Value name="24">
<Value>KeyboardType</Value>
</Value>
<Value name="25">
<Value>LabelColor</Value>
</Value>
<Value name="26">
<Value>LabelFlag</Value>
</Value>
<Value name="27">
<Value>LabelFontSize</Value>
</Value>
<Value name="28">
<Value>LabelFontStyle</Value>
</Value>
<Value name="29">
<Value>LabelFontWeight</Value>
</Value>
<Value name="30">
<Value>LineHeight</Value>
</Value>
<Value name="31">
<Value>PositionX</Value>
</Value>
<Value name="32">
<Value>PositionY</Value>
</Value>
<Value name="33">
<Value>RequiredFlag</Value>
</Value>
</Data>
<DataLocation>^CF.NUR.MNISV3.TemplateItemD</DataLocation>
<DefaultData>TemplateItemDefaultData</DefaultData>
<ExtentSize>1</ExtentSize>
<IdLocation>^CF.NUR.MNISV3.TemplateItemD</IdLocation>
<IndexLocation>^CF.NUR.MNISV3.TemplateItemI</IndexLocation>
<Property name="%%CLASSNAME">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="%%ID">
<AverageFieldSize>3</AverageFieldSize>
<Selectivity>1</Selectivity>
</Property>
<Property name="Color">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="DataSource">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="Display">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="FontSize">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="FontStyle">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="FontWeight">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="ItemCode">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="ItemDefault">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="ItemHeight">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="ItemName">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="ItemOption">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="ItemType">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="ItemWidth">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="KeyboardType">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="LabelColor">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="LabelFlag">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="LabelFontSize">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="LabelFontStyle">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="LabelFontWeight">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="LineHeight">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="PositionX">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="PositionY">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="RequiredFlag">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<Property name="TemplateId">
<AverageFieldSize>2</AverageFieldSize>
<Selectivity>100.0000%</Selectivity>
</Property>
<SQLMap name="Code">
<BlockCount>-4</BlockCount>
</SQLMap>
<SQLMap name="IDKEY">
<BlockCount>-4</BlockCount>
</SQLMap>
<SQLMap name="TemCode">
<BlockCount>-4</BlockCount>
</SQLMap>
<StreamLocation>^CF.NUR.MNISV3.TemplateItemS</StreamLocation>
<Type>%Storage.Persistent</Type>
}

}
